package com.ruoyi.bantong.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bantong.mapper.BtPlacecardConfigMapper;
import com.ruoyi.bantong.domain.BtPlacecardConfig;
import com.ruoyi.bantong.service.IBtPlacecardConfigService;

/**
 * 席位卡玩法配置Service业务层处理
 * 
 * @author laohei
 * @date 2021-01-24
 */
@Service
public class BtPlacecardConfigServiceImpl implements IBtPlacecardConfigService 
{
    @Autowired
    private BtPlacecardConfigMapper btPlacecardConfigMapper;

    /**
     * 查询席位卡玩法配置
     * 
     * @param userLevel 席位卡玩法配置ID
     * @return 席位卡玩法配置
     */
    @Override
    public BtPlacecardConfig selectBtPlacecardConfigById(Integer userLevel)
    {
        return btPlacecardConfigMapper.selectBtPlacecardConfigById(userLevel);
    }

    /**
     * 查询席位卡玩法配置列表
     * 
     * @param btPlacecardConfig 席位卡玩法配置
     * @return 席位卡玩法配置
     */
    @Override
    public List<BtPlacecardConfig> selectBtPlacecardConfigList(BtPlacecardConfig btPlacecardConfig)
    {
        return btPlacecardConfigMapper.selectBtPlacecardConfigList(btPlacecardConfig);
    }

    /**
     * 新增席位卡玩法配置
     * 
     * @param btPlacecardConfig 席位卡玩法配置
     * @return 结果
     */
    @Override
    public int insertBtPlacecardConfig(BtPlacecardConfig btPlacecardConfig)
    {
        btPlacecardConfig.setCreateTime(DateUtils.getNowDate());
        return btPlacecardConfigMapper.insertBtPlacecardConfig(btPlacecardConfig);
    }

    /**
     * 修改席位卡玩法配置
     * 
     * @param btPlacecardConfig 席位卡玩法配置
     * @return 结果
     */
    @Override
    public int updateBtPlacecardConfig(BtPlacecardConfig btPlacecardConfig)
    {
        btPlacecardConfig.setUpdateTime(DateUtils.getNowDate());
        return btPlacecardConfigMapper.updateBtPlacecardConfig(btPlacecardConfig);
    }

    /**
     * 批量删除席位卡玩法配置
     * 
     * @param userLevels 需要删除的席位卡玩法配置ID
     * @return 结果
     */
    @Override
    public int deleteBtPlacecardConfigByIds(Integer[] userLevels)
    {
        return btPlacecardConfigMapper.deleteBtPlacecardConfigByIds(userLevels);
    }

    /**
     * 删除席位卡玩法配置信息
     * 
     * @param userLevel 席位卡玩法配置ID
     * @return 结果
     */
    @Override
    public int deleteBtPlacecardConfigById(Integer userLevel)
    {
        return btPlacecardConfigMapper.deleteBtPlacecardConfigById(userLevel);
    }
}
